package weather;

import grammer.components.WeatherEnum;

public class CurrentWeather {
	private static CurrentWeather instance = new CurrentWeather();

	public static CurrentWeather getInstance() {
		return instance;
	}

	private int Temperature;

	private WeatherEnum weather;

	private CurrentWeather() {
		weather = WeatherEnum.SUNNY;
		Temperature = 18;
	}

	public int getTemperature() {
		return Temperature;
	}

	public WeatherEnum getWeather() {
		return instance.weather;
	}

	public double getWeatherCoef() {
		switch (instance.weather) {
		case SUNNY:
			return 1.1;
		case SNOW:
			return 0.5;
		case RAIN:
			return 0.6;
		case CLOUDED:
			return 0.7;
		default:
			return 1;
		}
	}

	public void setTemperature(int temperature) {
		Temperature = temperature;
	}

	public void setWeather(WeatherEnum weather) {
		instance.weather = weather;
	}

}
